package cc.shacocloud.mirage.demo.kotlin.config

import cc.shacocloud.mirage.bean.InitializingBean
import cc.shacocloud.mirage.bean.bind.Bean
import cc.shacocloud.mirage.bean.bind.Configuration
import cc.shacocloud.mirage.kotlin.Slf4j
import cc.shacocloud.mirage.kotlin.Slf4j.Companion.log

/**
 * @author 思追(shaco)
 * @date 2023/3/3
 */
@Configuration
class TestConfiguration {

    @Slf4j
    class TestBean : InitializingBean {
        override fun init() {
            log.info("testBean 初始化成功：${this}")
        }
    }

    @Bean(lazy = false)
    fun testBean(): TestBean {
        return TestBean()
    }

}